// TOWN SCRIPT
//    Town 18: Thessalonica (after winning)

// This is the special encounter script for this town.
// The states INIT_STATE, EXIT_STATE, and START_STATE have
// meanings that are described in the documentation. States you write
// yourself should be numbered from 10-100.

// flags:
// 4, 2 = Jack dialog switch flag (from original town)- should already be set...
// 18, 0 = entry message flag
// 18, 1 = smelt message
// 18, 3 = house message
// 18, 4 = warehouse message

begintownscript;

variables;

short choice;

body;

beginstate INIT_STATE;
	turn_off_training(TRUE);
	set_crime_tolerance(5);

	set_name(6, "Guard");
	set_name(7, "Guard");
	set_name(10, "Captain Jim");
	set_char_dialogue_pic(10, 1907, 0);
	set_name(11, "Cora");
	set_char_dialogue_pic(11, 531, 0);
	set_name(12, "Jack Robin");
	set_char_dialogue_pic(12, 541, 0);
break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
	if (get_flag(18, 0) == FALSE) {
		set_flag(18, 0, TRUE);
		reset_dialog();
		add_dialog_str(0, "The mining city of Thessalonica is coming back to life.", 0);
		add_dialog_str(1, "Parks, foliage and greenery are still thriving within the walls.", 0);
		add_dialog_str(2, "For a mining city, it's remarkably clean and pleasant, not at all dirty like others you've been to.", 0);
		add_dialog_str(3, "With the mines returning to work, the smelts and smithies of the city are starting to operate again.", 0);
		add_dialog_str(4, "And with The Wilderness released from its invasion, the city is preparing for returning citizens.", 0);
		add_dialog_choice(0, "Ok");
		choice = run_dialog(TRUE);
	}
break;

beginstate 10;
	if (get_flag(18, 1) == FALSE) {
		set_flag(18, 1, TRUE);
		message_dialog("The smelter is once again stoked up and working on early ore from the mines.",
			"A row of hot fire pits down the center of the room make the place hot and stuffy.");
	}
break;

beginstate 11;
	if (get_flag(18, 3) == FALSE) {
		set_flag(18, 3, TRUE);
		message_dialog("The house has been aired out and evidence suggests someone is about to move back in.",
			"The 'one day' has come for the owner of the house.");
	}
break;

beginstate 12;
	if (get_flag(18, 4) == FALSE) {
		set_flag(18, 4, TRUE);
		message_dialog("The massive ore storage warehouse is locked up tight.",
			"Through the bars of the entry gates, you can see piles of ore starting to accumulate.");
	}
break;
